package net.xdclass.component;

import net.xdclass.vo.PayInfoVO;
import redis.clients.jedis.StreamInfo;

public class PayStrategyContext {
    private PayStrategy payStrategy;

    public PayStrategyContext(PayStrategy payStrategy) {
        this.payStrategy = payStrategy;
    }

    /**
     * 不同策略 调用不同支付
     * @param payInfoVO
     * @return
     */
    public String executeUnifiedOrder(PayInfoVO payInfoVO) {
        return this.payStrategy.unifiedOrder(payInfoVO);
    }

    /**
     * 支付的策略 调用不同的查询订单支付状态
     * @param payInfoVO
     * @return
     */
    public String executeQueryPaySuccess(PayInfoVO payInfoVO) {
        return this.payStrategy.queryPaySuccess(payInfoVO);
    }
}
